<template>
  <div class="app-container">
    <table class="tb-table">
      <tr>
        <td class="tb-title" width="15%">公司名称:</td>
        <td colspan="3">
          {{ this.form.name }}

          <el-tag type="success" size="mini" hit>
            {{ this.form.businessStatus }}</el-tag
          >

          <el-tag v-if="this.form.microEnt === 1" size="mini" hit
            >小微企业</el-tag
          >

            <el-tag v-if="this.form.taxpayerType" size="mini" hit
            >{{this.form.taxpayerType}}</el-tag
          >
        </td>
      </tr>
  <!--     <tr v-if="this.form.alias">
        <td class="tb-title" width="15%">简称:</td>
        <td colspan="3">
          {{ this.form.alias }}
        </td>
      </tr> -->
      <tr v-if="this.form.englishName">
        <td class="tb-title" width="15%">英文名:</td>
        <td colspan="3">
          {{ this.form.englishName }}
        </td>
      </tr>
      <tr>
        <td class="tb-title" width="15%">公司性质:</td>
        <td colspan="3">
          {{ this.form.enterpriseType }}
        </td>
      </tr>
      <tr v-if="this.form.historyNames">
        <td class="tb-title" width="15%">曾用名:</td>
        <td colspan="3">
          {{ this.form.historyNames }}
        </td>
      </tr>

      <tr>
        <td class="tb-title" width="15%">注册资本:</td>
        <td width="35%">
          {{ this.form.regCapital }}
        </td>
        <td class="tb-title" width="15%">法定代表人:</td>
        <td width="35%">
          {{ this.form.legal }}
        </td>
      </tr>

      <tr>
        <td class="tb-title" width="15%">成立日期:</td>
        <td width="35%">
          {{ this.form.establishmentDate }}
        </td>
        <td class="tb-title" width="15%">核准日期:</td>
        <td width="35%">
          {{ this.form.approvalDate }}
        </td>
      </tr>
      <tr>
        <td class="tb-title" width="15%">统一社会信用代码:</td>
        <td width="35%">
          {{ this.form.socialCode }}
        </td>
        <td class="tb-title" width="15%">组织机构代码:</td>
        <td width="35%">
          {{ this.form.orgCode }}
        </td>
      </tr>

   <!--    <tr>
        <td class="tb-title" width="15%">股票类型:</td>
        <td width="35%">
          {{ this.form.bondType }}
        </td>
        <td class="tb-title" width="15%">股票号:</td>
        <td width="35%">
          {{ this.form.bondNum }}
        </td>
      </tr> -->

      <tr>
        <td class="tb-title" width="15%">注册地址:</td>
        <td colspan="3">
          {{ this.form.address }}
        </td>
      </tr>
      <tr>
        <td class="tb-title" width="15%">行业:</td>
        <td colspan="3">
          {{ this.form.industry }}
        </td>
      </tr>
      <tr>
        <td class="tb-title" width="15%">业务介绍:</td>
        <td colspan="3">
          {{ this.form.business }}
        </td>
      </tr>
    </table>
  </div>
</template>

<script>
import { getOne } from "@/api/sysCompany";

export default {
  name: "BaseInfo",
  props: ["companyId"],
  data() {
    return {
      form: {
        name: "",
        legal: "",
        businessStatus: "",
        establishmentDate: "",
        socialCode: "",
        identificationCode: "",
        orgCode: "",
        termDate: "",
        qualification: "",
        approvalDate: "",
        enterpriseType: "",
        industry: "",
        registrationAuthority: "",
        englishName: "",
        address: "",
        business: "",
      },
    };
  },
  methods: {
    handleQuery() {
      getOne(this.companyId).then((res) => {
        if (res.code === 20000) {
          this.form = res.data;
        }
      });
    },
  },
  mounted() {
    this.handleQuery();
  },
};
</script>

<style scoped>
.tb-table {
  width: 100% !important;
}

.el-tag {
  margin-left: 3px;
}
</style>
